/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package vendingmachine;

import java.util.List;

/**
 *
 * Nama File    : ObjectDispenser.Java
 * Deskripsi    : deskripsi dan implementasi kelas ObjectDispenser yang dapat mengeluarkan objek, baik berupa slug (jika tidak valid) maupun coin (jika ada kembalian atau storage object receiver telah penuh)
 * Nama Pembuat : Muhammad Ghufron Mahfudhi (23512066) dan Jonathan Ery Pradana (23512038)
 * Hari/Tanggal : Senin / 26 November 2012
 */
public class ObjectDispenser {
    
    //atribut
    
    //method
    public ObjectDispenser(){
        
    }
    
    public ObjectDispenser(Object o){
        CoinValidator validator = new CoinValidator(o);
        if(validator.isCoin()){
            UserDisplayNotification notif = new UserDisplayNotification(UserDisplayNotification.COIN_DISPENSED);
        } else{
            UserDisplayNotification notif = new UserDisplayNotification(UserDisplayNotification.SLUG_DISPENSED);
        }
    }
    
    public ObjectDispenser(List<Coin> coinList){
        if (coinList.size() > 0){
            UserDisplayNotification notif = new UserDisplayNotification(UserDisplayNotification.COIN_DISPENSED);
        }else{
            UserDisplayNotification notif = new UserDisplayNotification(UserDisplayNotification.NOTHING_DISPENSED);
        }
    }
    
    public ObjectDispenser(List<Coin> coinList,int changeValue){
        UserDisplayNotification notif = new UserDisplayNotification(UserDisplayNotification.COUNT_MONEY, "change" , changeValue, true);
    }
}
